home *** CD-ROM | disk | FTP | other *** search
-
-
- DB
- The Manual
-
- by Alan Farrell
- (c) 1989
- DB Produced using TDI Modula2 and the ARP library v3.0.
-
-
- 1. Overview.
-
- 2. Starting the program.
-
- 3. The menus.
-
- 4. A Small Tutorial.
-
- 5. Searching.
-
- 6. Reports/Printing.
-
- 7. If you want to...
-
- 8. Everyting I can't think of a topic for.
-
-
- ----------------------------------------------------------------------------
-
- This software is *NOT* public domain. It is FREE. It cannot be sold
- or altered without express written consent from the author. This
- program is also NOT shareware. I do not expect you to send me money
- for this program, I am not a starving artist. If it will make you
- feel better, feel free to send away, but don't feel guilty if you
- don't.
-
- This software may be freely distributed so long as all files are
- included intact and unchanged. No one may charge any more than
- the cost of distribution for this software.
-
- If you want to contact me for any reason, bug reports, ideas, a job,
- please leave E-mail on plink. I check in about every 2 weeks.
-
- ----------------------------------------------------------------------------
-
-
-
-
-
-
-
- 1. Overview.
-
- This is a very basic database program. It allows you to create a database
- with up to 50 fields. Each field can be from 1 to about 3000 characters.
- There can be a maximum of about 1.2 Million records to a database. Each
- record can be a maximum of about 3000 characters long. This means that if
- you create a field of 1000 characters that there are only about 2000
- characters remaining for the other fields in the record.
-
-
-
-
- 2. Starting the program.
-
- To run from cli type either "db" or "run db".
-
- To run from Workbench double click the "db" icon.
-
- This program accepts no command line parameters and does not check for
- extended selection from Workbench.
-
- This program expects the default font to be a 8 point non-proportional
- font like Topaz8, the default 80-column font. If the characters are
- overlapping the grid lines, you're using the wrong font.
-
-
- 3. The Menus.
-
- TEMPLATE DATABASE
-
- Load Open
- Save Close
- Save As Next R
- Clear Prev R
- Credits Delete R
- Match R
- Next M R
- Print R
- Report
-
- Template:Load Loads a pre-created template into the template editor.
- Template:Save Saves the current template under the current filename.
- Template:Save As Saves the current template using a new name.
- Template:Clear Clears the current template.
- Template:Credits Gives credit where credit is due.
-
- Database:Open Opens a database (DB).
- Database:Close Closes the currently open DB.
- Database:Next R Loads and displays the next record in the file.
- Database:Prev R Loads and displays the previous record in the file.
- Database:Delete R Delete the current record. Note: this function writes
- a record containing only spaces to the disk. The screen
- is left the same. If you accidently delete a record,
- pressing the Numeric Enter key will re-write the info
- to the record.
- Database:Match R Searches the current DB for any records that match
- the info in the current record. Note: any spaces in
- the current record are considered wildcard characters
- and are ignored in the record comparison.
- Database:Next M R From the current position in the database, searches
- forward for the next match.
-
- Database:Print R Prints the current record to PRT:
-
- Database:Report Prints all records matching the current record to
- either PRT: or a file user specifies.
-
-
-
-
-
-
- 4. A Small Tutorial.
-
- When first starting the db program, one is presented by a screen grid
- representing all the characters that will be shown when entering data
- into the database. Each box can contain either a character or a field-
- defining (FD) character. You can move about the grid by using the cursor
- keys or by clicking on the box you want to fill.
-
- A character is any printable character (except "`"). These are entered
- into the template by simply typing. The are not used in DB input
- operations-they are there simply for user reference to fields.
-
- A FD character is entered by pressing the "`" key.
-
- Lets begin.
- Start the program. Now press the "`" key. An orange square appears in
- the first square and the cursor advances one square. This is a FD
- character. Where FD characters is used in the template define where and
- how long the fields are in the DB.
-
-
- If you were to enter 3 lines of 30 FD characters you would have a DB
- consisting of 3 fields each 30 characters long. You could enter text
- around the FDs to define what each field is.
-
-
- Example: (using "*" as the FD)
-
-
-
- Name:***************************,**************
-
- Ph# :***-***-****
-
- Addr:******************************************
-
-
-
- The above example creates a simple DB that has 6 fields used to store
- information about a person.
-
- F1: The last name field
- F2: (after the comma)-The First name field.
-
- ** Note **
- The comma breaks up the name field into 2 seperate fields.
- ANY GAP IN A STRING OF FDs WILL DO THE SAME.
- **********
-
- F3: The area code of the ph#.
- F4: The prefix of the ph#.
- F5: The suffix of the ph#.
- F6: The address.
-
-
-
- ** Note **
- After creating a template/DB and saving it, it is no longer possible
- to add, subract, or change the size of any fields. It is FIXED, so
- make sure you plan out what you want done before you do it!
-
- The program will let you make these changes so you can base another
- DB on the first one, and it will even let you save it under the same
- name, but if you do you take the (very likely) chance of trashing
- the first DB.
-
- You have been WARNED!
- **********
-
-
- Back to the tutorial! After creating the above template, choose the
- TEMPLATE:Save As option and enter a name for the template/db into it.
- Choose OK in the file-requester. The template will be saved and if
- a DB does not exist with that name one will be created.
-
- Now, choose DATABASE:Open option and choose the filename you just
- created. Ignore the .tmpl file as it is for internal use only. Choose
- OK from the file-requester. The DB should be opened and a blank record
- should be displayed. The window title should say "EOF (End of File)".
- This means that currently you are at the end of the file, ready to
- enter a new record.
-
- You can move around this screen many ways.
-
- To move forward in a field press the Cursor right key, type anything,
- or press the space bar. You cannot exit the field using these keys.
-
- To move back in a field press the Cursor left key or the <- key.
-
- To move forward to the next field press either:
- The regular return key or
- The Cursor down key or
- The tab key or
- The Numeric pad + key
-
- To move back a field press either:
- The Cursor up key or
- The Numeric pad - key
-
- When you are done entering info into the record, press the Numeric Enter
- key. This key will save the record on screen to disk into the current
- record number and advance the record number by 1. The previous records
- info is left on the screen in case you have many records that share info
- in some fields.
-
- The title bar should still say EOF. To go back to the record we just
- entered choose DATABASE:Prev R from the menu or press Amiga-p or press
- the F1 key. This will move us back to the first record. You can now edit
- the record again and save it again if you made a mistake.
-
- If you do not save it again, and you want to edit the next record, press
- either the F2 key, Amiga-N, or choose DATABASE:Next R from the menu.
-
- 5. Searching.
-
- To Search a DB for a specific bit of info, first open the DB.
- Next, type the search criteria into the blank record.
-
- To use the example above, say you want to find all the people who live
- in the 916 area code. You would leave all other fields blank and enter
- 916 into the area code field. Then either press Amiga-M or choose
- DATABASE:Match R. The DB will be searched for any matches. If one is
- found it will be displayed. You can edit it or find the next match by
- either pressing Amiga-/ or choosing DATABASE:Next M R.
-
- 6. Reports/Printing.
-
- Note: The only print routines that have been tested are the routines
- that print to a file. I don't have a printer and I can't guarantee
- any output.
-
- Right now there are only 2 basic printing functions. The first is
- DATABASE:Print R. This prints the current record to the PRT: device.
-
- The second print function is DATABASE:Report. This function first asks
- you if you want to print to a file or to the PRT: device. If you print
- to PRT: output will go directly to your printer. If you choose to print
- to a file output will go to the file you specify in the file-requester in
- exactly the same format as it would go to the printer. This is useful if
- you want to import DB records into a word processor or you want to print
- the report later directly from the file.
-
- It works like this. Fill out a record as if you were going to do a
- search, then choose DATABASE:Report or press Amiga-R or press F4. A
- requester will ask you where you want output to go. If you choose to
- print to a file the filerequester will appear so you can pick a file.
-
- After you choices have been made Report will search the DB for all
- records matching the search record. If any are found they will be
- output as they are shown in the TEMPLATE for this DB. That's it. Basic,
- but it gets the job done.
-
-
- 7. If you want to...
-
- Load a previously created template.
- Choose TEMPLATE:Load, enter/choose the filename, click OK.
-
-
-
- Save a template.
- Choose TEMPLATE:Save to save with current name or TEMPLTE:Save As
- to save with a new name.
-
-
-
- Clear a template.
- Choose TEMPLATE:Clear.
-
-
-
- See my name.
- Choose TEMPLATE:Credits.
-
-
-
- Open a database file.
- Choose DATABASE:Open, enter/choose the filename, click OK.
-
-
-
- Close a database file.
- Choose DATABASE:Close. This will close the DB and return to template
- editing.
-
-
-
- See the next record in a DB.
- Choose DATABASE:Next R.
-
-
-
- See the previous record in a DB.
- Choose DATABASE:Prev R.
-
-
-
- See the first record in a DB.
- Do a Search of the DB with the search record blank. This will match
- all records, and will display the first record.
-
-
-
- See the last record in a DB.
- Do a Search of the DB with a search record you know will have no
- matches. Search will search the DB to the end, tell you there are no
- matches, and leave you at the last record.
-
-
-
- Delete a record.
- Choose DATABASE:Delete R. This really doesnt delete the record, it
- writes spaces to the record on disk. It also leaves the record on
- screen, so if you do it accidentally, just press the NumEnter key
- and it will re-write the record to the DB.
-
-
-
- Search for a specific record/set of criteria.
- Clear out the current record, enter search criteria, and choose
- DATABASE:Search R.
-
-
-
- Find the next match in a search.
- Choose DATABASE:Next M R.
-
-
-
- Print the current record to PRT:.
- Press F3 or Amiga-H or choose DATABASE:Print R.
-
-
-
- Print the current record to a file.
- Press F4 or Amiga-R or choose DATABASE:Report. Choose file for output.
- Because the current record is (if you don't have duplicate records)
- the only record that will match the search criteria, it will be
- printed.
-
- Print all the records to file or PRT:
- Make a blank search record. Choose DATABASE:Report. Choose the output
- method. Because the search record is blank it will match all records
- and they will be printed.
-
-
- 8. Everything I cant think of a topic for.
-
- Remember, don't be shy with records on screen. You can completely erase
- the current on-screen record to use it for a search. You only premanently
- erase records when you blank it out and press NumEnter.
-
- Watch the record# in the title bar. Some functions automaticly advance
- to the next record, some don't. Watch it!
-
- Remember, DATABASE:Delete only deletes the record in the DB. It leaves
- it on the screen so if you change your mind all you have to do is press
- NumEnter to restore it on disk.
-
- REPORT ALL BUGS!! They don't get fixed if I don't know about them!
-
-
- Alan Farrell
- 11/07/89
-
- plink: ajf
-